         <?
        require_once('header.php'); // uri  
        ?>
      <script type="text/javascript" src="js/jquery.validate.js"></script>  

     <link rel="stylesheet" href="css/login.css">
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
           <img src="img/meetme-logo.png" class="siteLogo">
        <div class="wrapper">
            
            <p class="portal namePage">MeetMe</p>
            <p class="welcome desPage">ระบบจัดการเอกสารการประชุม (สสส.)</p>
            <form class="formLogin" id="formLogin" name="formLogin" method="post" >
              <img src="img/meetmelogo.jpg" alt="meetme logo">
              <div class="wrpFormLI">
                <input class="inptUsername inptUserPwd" name="username" type="text" placeholder="Username or Email">
                <input class="inptPassword inptUserPwd"  name="password1" type="password" placeholder="Password">
              </div>
              <div class="rmFg">
                <input class="inptRemember" type="checkbox">
                <em>Remember Me<em>
                <a class="forgot" href="<?=baseinfo?>/forgotpassword">Forgot Password?</a>
              </div>
              <button class="btnLog"  >Log in</button>
            </form>
        </div>
        
        <script>
       $().ready(function() {
            $("#formLogin").validate({ 
            rules: {
            username: "required",
            password1: "required"
            
           },
           messages: {   
           username: "Please enter your username",
           password1: "Please enter your password"
           },
           submitHandler: function() { 
           

           postCORS('<?=serviceinfo?>login',$('#formLogin').serialize() ,function(data) {
         
                  if(data.error==0)
                  {
                    <?if($this->data['linktosetto']){?>
                    location.href="<?=$this->data['linktosetto']?>";
                    <?}else{?>
                    location.href=data.link;
                    <?}?>
                  
                  }else
                  {
                  
                   alert(data.error);
                   
                  }

                 return false; 
           });
           return false;
           
           
           }
            });
        });
      </script>
    <?
        require_once('footer.php'); // uri  
        ?>